/**
 * 
 */
package org.dse.util;

import java.io.File;

/**
 * This interface only provides some constants the system will use. Like the
 * line sperator in the raw file, the raw file char set.
 * 
 * @author zhangchen
 * 
 */
public interface Constants {

	/**
	 * The line seperator in the raw html documents file.
	 */
	public static final char LINE_SEPERATOR = '\n';

	/**
	 * The directory containing the raw files.
	 */
	public static final String RAW_FILES_DIR = "." + File.separator
			+ "rawfiles";

	/**
	 * The batch size is used in the Hibernate O-R mapping. Because the data is
	 * large, when using Hibernate to save objects, in order not to meet the out
	 * of memory error, we must flush and clear the memory when the number of
	 * objects reachs this constant.
	 */
	public static final int BATCH_SIZE = 1000;

	/**
	 * Each document has a mime type, such as application/pdf,
	 * application/msword. This string represents the common html document mime
	 * type.
	 */
	public static final String HTML_MIMETYPE = "text/html";

	/**
	 * The default char set used in the raw files.
	 */
	public static final String DEFAULT_CHARSET = "UTF-16";

	/**
	 * When the system starts, it will read the task file to get the task in
	 * this running. If the user does not give a task file. This default task
	 * file will be used.
	 */
	public static final String TASK_FILE = "task";

	/**
	 * A specific string in the task file indicating the raw files to be
	 * processed in this running.
	 */
	public static final String CREATE_INDEX_FILE = "Files to create index:";

	/**
	 * A specific string in the task file indicating the urls to be deleted in
	 * this running.
	 */
	public static final String DELETED_URL = "Deleted URL:";
}
